<?php
Route::prefix("ogreencard")->namespace("OgreenCard")->group(function(){

    Route::any("login", 'UserController@login')->name("ogreenLogin");

    Route::middleware(["ogreen.admin.login"])->group(function()
    {
        Route::get("index",     "IndexController@index")->name("ogreenHome");

        Route::get("logout",    "UserController@logout");
        Route::get("welcome",   "UserController@welcome");
        Route::any('addUser',   "UserController@addUser");
        Route::any("delUser",   "UserController@delUser");
        Route::get('users',     "UserController@users");


        Route::get("{action}.html",function($action){return view("chinabank/admin/template/".$action);});
        Route::get("{action}.html",function($action){return view("chinabank/admin/template/".$action);});

        //品牌
        Route::get('brands',    "ShopController@brands");
        Route::any("brandEdit", "ShopController@brand_edit");
        Route::get("brandDel",  "ShopController@brand_del");
        Route::get("brandShops","ShopController@brand_shops");
        Route::any('shopEdit',  "ShopController@shop_edit");
        Route::any('shopDel',   "ShopController@shop_del");

        //卡券
        Route::any('cards',     "CardController@cards");
        Route::get("cardDel",   "CardController@cardDel");
        Route::any("importCard","CardController@importCard");
        Route::any("importCardExcel",'CardController@importCardExcel');
        Route::any('cardTypes', "CardController@types");
        Route::any("cardTypeEdit",  "CardController@typeEdit");
        Route::any("cardTypeDel",   "CardController@typeDel");
        Route::any("checkCardValid","CardController@checkCardValid");
        Route::any('cardDisable',   "CardController@cardDisable");

        //订单
        Route::any("orders",    "OrderController@orders");
        Route::any('orderDel',  "OrderController@orderDel");
        Route::get('orderEdit',"OrderController@orderEdit");
        Route::post('orderEdit',"OrderController@orderEditPost");
        Route::any('orderCard',"OrderController@orderCard");
        Route::any('orderGoods',"OrderController@orderGoods");
        Route::any('orderExpress',"OrderController@orderExpress");
        Route::any('orderImport',"OrderController@orderImport");

        //产品
        Route::any("goods",     "GoodsController@goods");
        Route::any('goodsEdit', "GoodsController@goodsEdit");
        Route::any('goodsUpload',"GoodsController@upload");

    });
});
